# Copyright 2022 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

workspace(name = "com_google_quiche")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# -------- Bazel tooling dependencies --------

http_archive(
    name = "bazel_skylib",
    sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",  # Last updated 2022-05-18
    urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz"],
)

# -------- Dependencies used in core QUICHE build --------

http_archive(
    name = "com_google_absl",
    sha256 = "bb5e84fc74362c546ab4193eeafd440a26487f4adf80587d2f2576f03c439c4b",  # Last updated 2024-03-06
    strip_prefix = "abseil-cpp-53e6dae02bf0d9a5a1d304a3d637c083376b86a1",
    urls = ["https://github.com/abseil/abseil-cpp/archive/53e6dae02bf0d9a5a1d304a3d637c083376b86a1.zip"],
)

http_archive(
    name = "com_google_protobuf",
    sha256 = "8b28fdd45bab62d15db232ec404248901842e5340299a57765e48abe8a80d930",  # Last updated 2022-05-18
    strip_prefix = "protobuf-3.20.1",
    urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.20.1.tar.gz"],
)

http_archive(
    name = "boringssl",
    sha256 = "03079cbfe0f1c60cab58961ec45946974d9d89f90ef117b09839ae731697a81a",  # Last updated 2023-06-22
    strip_prefix = "boringssl-e2fa83865bfcf969f0c71673c1a5eba2814ec447",
    urls = ["https://github.com/google/boringssl/archive/e2fa83865bfcf969f0c71673c1a5eba2814ec447.tar.gz"],
)

http_archive(
    name = "com_google_quic_trace",
    sha256 = "079331de8c3cbf145a3b57adb3ad4e73d733ecfa84d3486e1c5a9eaeef286549",  # Last updated 2022-05-18
    strip_prefix = "quic-trace-c7b993eb750e60c307e82f75763600d9c06a6de1",
    urls = ["https://github.com/google/quic-trace/archive/c7b993eb750e60c307e82f75763600d9c06a6de1.tar.gz"],
)

http_archive(
    name = "com_google_googleurl",
    sha256 = "1d2c507cc31e109ecb41ba1fe766f5ff0f5974c3ba8d0919b3d22668f7e89305",  # Last updated 2023-07-06
    urls = ["https://storage.googleapis.com/quiche-envoy-integration/googleurl-5573f9aa120f3fbd378ca1b2565bbf7d223cd542.tar.gz"],
)

http_archive(
    name = "zlib",
    build_file = "//build:zlib.BUILD",
    sha256 = "d8688496ea40fb61787500e863cc63c9afcbc524468cedeb478068924eb54932",  # Last updated 2022-05-18
    strip_prefix = "zlib-1.2.12",
    urls = ["https://github.com/madler/zlib/archive/refs/tags/v1.2.12.tar.gz"],
)

# -------- Dependencies used by QUICHE tests and extra tooling --------

http_archive(
    name = "com_google_googletest",
    sha256 = "82808543c49488e712d9bd84c50edf40d692ffdaca552b4b019b8b533d3cf8ef",  # Last updated 2023-04-12
    strip_prefix = "googletest-12a5852e451baabc79c63a86c634912c563d57bc",
    urls = ["https://github.com/google/googletest/archive/12a5852e451baabc79c63a86c634912c563d57bc.zip"],
)

http_archive(
    name = "com_googlesource_code_re2",
    sha256 = "1726508efc93a50854c92e3f7ac66eb28f0e57652e413f11d7c1e28f97d997ba",  # Last updated 2023-06-01
    strip_prefix = "re2-03da4fc0857c285e3a26782f6bc8931c4c950df4",
    urls = ["https://github.com/google/re2/archive/03da4fc0857c285e3a26782f6bc8931c4c950df4.zip"],
)

# -------- Load and call dependencies of underlying libraries --------

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()
